echo off & color 0A

set DIR="%cd%\models" 
echo DIR=%DIR%


for /R %DIR% %%f in (*.json) do ( 
echo %%f



java -jar swagger-codegen-cli-2.4.21.jar generate -i %%f  -l java --group-id cn.puffin-erp --api-package com.amazon.spapi --artifact-id amazon-sp-api --model-package com.amazon.spapi.models -t  clients/sellingpartner-api-aa-java/resources/swagger-codegen/templates -o   clients/selling-partner-api-codegen
)



mklink /j "clients/selling-partner-api-codegen/src/main/java/com/amazon/SellingPartnerAPIAA" "clients\sellingpartner-api-aa-java\src\com\amazon\SellingPartnerAPIAA"


mklink /j "clients/selling-partner-api-codegen/src/main/java/com/amazon/spapi/documents" "clients/sellingpartner-api-documents-helper-java/src/main/java/com/amazon/spapi/documents"


pause